package com.ruoyi.ucenter.service;

import com.ruoyi.common.core.domain.AjaxResult;

import javax.mail.MessagingException;

public interface ISmsCodeService {

    /**
     * 发送短信
     *
     * @param phone 手机
     * @return 返回状态
     */
    AjaxResult sendValidateCode(String phone);

    /**
     * 发送邮箱
     * @param mail
     * @return
     * @throws MessagingException
     */
    AjaxResult sendMailCode(String mail) throws MessagingException;

    /**
     * 判断手机或邮箱验证码是否正确
     * @param redisKey
     * @param code
     * @return
     */
    Boolean checkCode(String redisKey,String code);
}
